<script lang="ts" setup>
import { toggleDark } from "~/composables";
</script>

<template>
  <div class="color h60 border_bottom">
    <!-- <div class="logo w120 dpi">SDP组件库</div> -->
    <div class="logo w120">ElementMax</div>
    <div class="w100vw-130">
      <el-menu class="el-menu-demo" mode="horizontal">
        <el-sub-menu index="2">
          <template #title>工作空间</template>
          <el-menu-item index="2-1">空间1</el-menu-item>
          <el-menu-item index="2-2">空间2</el-menu-item>
          <el-menu-item index="2-3">空间3</el-menu-item>
          <el-sub-menu index="2-4">
            <template #title>item four</template>
            <el-menu-item index="2-4-1">item one</el-menu-item>
            <el-menu-item index="2-4-2">item two</el-menu-item>
            <el-menu-item index="2-4-3">item three</el-menu-item>
          </el-sub-menu>
        </el-sub-menu>
        <el-menu-item index="3" disabled>Info</el-menu-item>
        <el-menu-item index="4">Orders</el-menu-item>
        <el-menu-item h="full" @click="toggleDark()">
          <button
            class="border-none w-full bg-transparent cursor-pointer"
            style="height: var(--ep-menu-item-height)"
          >
            <i inline-flex i="dark:ep-moon ep-sunny" />
          </button>
        </el-menu-item>
      </el-menu>
    </div>
  </div>
</template>
<style lang="scss" scoped>
.logo {
  font-size: 20px;
  font-weight: 600;
  float: left;
  margin: 14px 5px;
  user-select: none;
  cursor: pointer;
}
.w120 {
  width: 120px;
}
.dpi {
  display: inline;
}
.dpib {
  display: inline-block;
}
.w100vw-130 {
  width: calc(100vw - 135px);
}
.h60 {
  height: 58px;
}
.border_bottom {
  border-bottom: solid 1px var(--ep-menu-border-color);
}
.color {
  color: var(--ep-color-primary);
  // background: linear-gradient(
  //   to right,
  //   yellow,
  //   red,
  //   orange,
  //   orange,
  //   orange,
  //   orange,
  //   red,
  //   yellow
  // );
  // color: white;
}
</style>